package pers.cocoadel.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import pers.cocoadel.springcloud.entities.CommonResult;
import pers.cocoadel.springcloud.entities.Payment;
import pers.cocoadel.springcloud.serveice.PaymentService;

@RestController
public class PaymentController
{
    private final PaymentService paymentService;

    @Autowired
    public PaymentController(PaymentService paymentService)
    {
        this.paymentService = paymentService;
    }

    @GetMapping("/consumer/payment/paymentSql/{id}")
    public CommonResult<Payment> paymentSql(@PathVariable("id") Integer id)
    {
        return paymentService.paymentSql(id);
    }


}
